import React, { Component } from 'react';
import {Popup} from 'antd-mobile'
import style from './guideMask.scss'

class GuideMask extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }
    render() {
		let cacheAddress = this.props.cacheAddress;
	    return (
            <div className={style.mask} style={this.props.isShowMask?{}:{display: 'none'}} onClick={()=>{this.props.onClick()}} ref="prevent" onTouchMove={(e)=>{e.preventDefault(); e.stopPropagation();}}>
				<div className={style.prompt}>
					<div className={style.title}>
						您当前所选择的收件地方（{`${cacheAddress.fullAddr}`}）暂未开通上门收件服务，我们建议您更换收件人地址，或是到以下附近的邮政网点办理：
					</div>

					{
						this.props.emsSitesList.map((e,i)=>
							<p className={style.address} key={i}>
								{
									`${i+1}、${e.name} 地址:${e.address}`
								}
							</p>
						)
					}
					<div className={style.btn}>
						确定
					</div>
				</div>
            </div>
        )
    }
}

GuideMask.defaultProps = {
	cacheAddress:{
		fullAddr: '',
		street: ''
	}
}

export default GuideMask